/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pkl53.view;

import java.awt.CardLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;


/**
 *
 * @author User
 */
public class UpdatePanel extends javax.swing.JPanel {
    private MainFrame mainFrame;
    private JPanel panel;
    private CardLayout card;
  

    /**
     * Creates new form updatePanel
     */
    public UpdatePanel() {
        initComponents();
        
    }
    
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        background1 = new pkl53.image.Background();
        jLayeredPane1 = new javax.swing.JLayeredPane();
        B1R1 = new javax.swing.JTextField();
        B1R2 = new javax.swing.JTextField();
        B1R3 = new javax.swing.JTextField();
        B1R4 = new javax.swing.JTextField();
        B1R5a = new javax.swing.JTextField();
        B1R5b = new javax.swing.JTextField();
        B1R8 = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();

        setPreferredSize(new java.awt.Dimension(1366, 768));
        setLayout(new java.awt.BorderLayout());

        background1.setLayout(new java.awt.BorderLayout());

        jLayeredPane1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
        jLayeredPane1.add(B1R1, new org.netbeans.lib.awtextra.AbsoluteConstraints(730, 238, 29, 29));
        jLayeredPane1.add(B1R2, new org.netbeans.lib.awtextra.AbsoluteConstraints(680, 274, 79, 29));
        jLayeredPane1.add(B1R3, new org.netbeans.lib.awtextra.AbsoluteConstraints(680, 310, 80, 29));

        B1R4.setAlignmentX(0.2F);
        jLayeredPane1.add(B1R4, new org.netbeans.lib.awtextra.AbsoluteConstraints(730, 347, 29, 29));
        jLayeredPane1.add(B1R5a, new org.netbeans.lib.awtextra.AbsoluteConstraints(600, 382, 30, 29));
        jLayeredPane1.add(B1R5b, new org.netbeans.lib.awtextra.AbsoluteConstraints(600, 420, 30, 29));
        jLayeredPane1.add(B1R8, new org.netbeans.lib.awtextra.AbsoluteConstraints(698, 454, 60, 29));

        jButton1.setBackground(new java.awt.Color(51, 153, 255));
        jButton1.setFont(new java.awt.Font("Calibri", 3, 14)); // NOI18N
        jButton1.setForeground(new java.awt.Color(255, 255, 255));
        jButton1.setText("Home");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        jLayeredPane1.add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(520, 160, 120, 30));

        jButton2.setBackground(new java.awt.Color(51, 153, 255));
        jButton2.setFont(new java.awt.Font("Calibri", 3, 14)); // NOI18N
        jButton2.setForeground(new java.awt.Color(255, 255, 255));
        jButton2.setText("Find");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        jLayeredPane1.add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(650, 159, 120, 31));

        background1.add(jLayeredPane1, java.awt.BorderLayout.CENTER);

        add(background1, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
    card = (CardLayout) panel.getLayout();
        card.show(panel, "homePanel");
        // TODO add your handling code here:
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        card = (CardLayout) panel.getLayout();
        card.show(panel, "dataEntri");
    }//GEN-LAST:event_jButton2ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField B1R1;
    private javax.swing.JTextField B1R2;
    private javax.swing.JTextField B1R3;
    private javax.swing.JTextField B1R4;
    private javax.swing.JTextField B1R5a;
    private javax.swing.JTextField B1R5b;
    private javax.swing.JTextField B1R8;
    private pkl53.image.Background background1;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLayeredPane jLayeredPane1;
    // End of variables declaration//GEN-END:variables

    /**
     * @return the mainFrame
     */
    public MainFrame getMainFrame() {
        return mainFrame;
    }

    /**
     * @param panel
     */
    public void setMainFrame(JPanel panel,JFrame mainFrame) {
        this.panel=panel;
        this.mainFrame=(MainFrame) mainFrame;
        this.mainFrame.setExtendedState(JFrame.NORMAL);
        
    }
}
